/**
 * @projectName ax-manager
 * @version V1.0
 * @address http://www.yingmob.com/
 * @copyright 本内容仅限于淮安爱赢互通科技有限公司内部使用，禁止转发.
 */
package com.amoby.main.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.amoby.main.service.CommBankService;

@Component
public class CommBankTask {
    private static final Logger logger = LoggerFactory.getLogger(CommBankTask.class);
    @Autowired
    private CommBankService     commBankService;

    //@Scheduled(cron = "0 0/2 * * * ?")
    public void syncSftp() {
        logger.debug("开始执行同步commbank回授文件定时任务");
        try {
            commBankService.checkFeedback();
        } catch (Exception e) {
            logger.error("执行同步commbank回授文件定时任务失败", e);
        }
    }
    
    @Scheduled(cron = "0 0/2 * * * ?")
    public void syncSftpBatch() {
        logger.debug("开始执行同步commbank回授文件定时任务");
        try {
            commBankService.checkFeedbackBatch();
        } catch (Exception e) {
            logger.error("执行同步commbank回授文件定时任务失败", e);
        }
    }

}
